<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
	<ui:composition template="./main.xhtml">
		<ui:define name="content">
		<br/>
		<p:messages autoUpdate="true" closable="true" />
		<h:form>
		<p:panelGrid columns="2" columnClasses="ui-widget-header left,left">
			<f:facet name="header">
				グループを編集または登録
   			</f:facet>
			<p:outputLabel value="グループ名" for="staffName"/>
			<p:inputText id="staffName" value="#{staffGroupConversation.selectStaffGroup.name}" required="true"/>
			<p:outputLabel value="並び順" for="index"/>
			<p:inputText id="index" value="#{staffGroupConversation.selectStaffGroup.index}" required="true"/>
			<h:outputText value="利用者"/>
			<p:selectManyCheckbox id="grid" value="#{staffGroupConversation.selectStaffGroup.staffs}" layout="grid" columns="3" converter="#{staffConverter}">
    	        <f:selectItems value="#{sessionBean.staffList}" var="staff" itemLabel="#{staff.formalName}" itemValue="#{staff}" />
        	</p:selectManyCheckbox>
		</p:panelGrid>
		<br />
		<p:commandButton action="#{staffGroupController.saveStaffGroup}" value="保存" styleClass="button_big"/>
		<p:commandButton action="#{staffGroupController.cancel}" value="キャンセル" immediate="true" styleClass="button_big"/>
		</h:form>
		</ui:define>
	</ui:composition>
</html>